#!/usr/bin/perl

use strict;
use warnings;

use Carp ();
use Symbol::Util ();

$SIG{__WARN__} = sub { local $Carp::CarpLevel = 1; Carp::confess("Warning: ", @_) };

use Test::More tests => 2;

eval q{
    package namespace::globref::Test20::Package1;
    use namespace::globref 'a';
};
like($@, qr/Undefined subroutine/, 'import unknown subroutine');

eval q{
    package namespace::globref::Test20::Package2;
    use namespace::globref 'a';
};
like($@, qr/Undefined subroutine/, 'unimport unknown subroutine');
